let express = require('express');
let router = express.Router();

// 工具包
const { createRes } = require('../utils/index');
let { testSend } = require('../model/emailUtil');
let { error, success } = require('./guide/prompt');


router.get('/testSend', async function (req, res) {
    let flag = await testSend(req.query.email)
    if (flag) {
      res.send(createRes(200, success.sendEmail))

    } else {
      res.send(createRes(200, error.sendEmail))
    }
  });
  
  module.exports = router;